Communication-avoiding algorithm